package Solution_3;

public class Consume {
    private Card card;
    private InternetServer internet;
    private CallServer call;
    public Consume(Card card,InternetServer internet,CallServer call){
        this.card =card;
        this.internet = internet;
        this.call = call;
    }
    public void consume(){
        /*
        统计上网时长
         */
        internet.consume();
        /*
        统计通话时长
         */
        call.consume();

        System.out.println("每月消费：" + card.getRemain());
    }
}
